(function() { 
    //ng路由 
  	appCommon.config(function ($routeProvider, $locationProvider) {
        $routeProvider
        //首页
        .when('/index', {
            templateUrl: '/Public/client/js/index/index.html'
        })   

        //登录
        .when('/login', {
            templateUrl: '/Public/client/js/login/index.html',
            controller: "loginDefaultCtr"
        })        

        //用户信息
        .when('/userInfo', {
            templateUrl: '/Public/client/js/userInfo/index.html'
        }) 

        //发表文章
        .when('/post', {
            templateUrl: '/Public/client/js/post/index.html',
            controller: "postCtr"
        }) 

        //文章详情
        .when('/content', {
            templateUrl: '/Public/client/js/content/index.html'
        })   

        //默认跳转
        .otherwise({
            templateUrl: '/Public/client/js/index/index.html'
        });

        //$locationProvider.html5Mode(true);
    }).config(['ngDialogProvider', function (ngDialogProvider) {
        ngDialogProvider.setDefaults({
            className: 'ngdialog-theme-default',
            plain: false,
            showClose: true,
            closeByDocument: true,
            closeByEscape: true,
            appendTo: false,
            preCloseCallback: function () {
                console.log('default pre-close callback');
            }
        });
    }]);; 
})();